<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', function () {
    return view('welcome');
});

Route::get('/p1', function () {
    $data = [
        ["id" => 1,
            "title" => "LED动感演示道具火随锅控",
            "views" => 123
        ],
        ["id" => 2,
            "title" => "定制型LED常亮发光标识牌",
            "views" => 234
        ],
        ["id" => 3,
            "title" => "Led常规卡布动感灯箱",
            "views" => 345
        ],
    ];
    return view('product/list-products',["data"=>$data]);
});

Route::get('/p2', "ProductController@listProducts");






